using System;
using System.Collections.Generic;
using NHibernate.Expression;

namespace CosyTrade.StoreManagement
{
    public interface IProductManager
    {
        void CreateProductCategory(ProductCategoryBase categoryInfo, Guid parentCategoryGuid);
        void UpdateProductCategory(ProductCategoryBase categoryInfo,Guid oldKey);
        void DeleteProductCategory(Guid categoryGuid);
        ProductCategory GetProductCategoryDetail(Guid categoryGuid);
        IList<ProductCategoryBase> GetProductCategoryRootlist();
        IList<ProductCategoryBase> GetProductCategoryList(ICriterion criterion);

        void CreateProduct(Product product);
        void UpdateProduct(Product product);
        void DeleteProduct(Guid productGuid);
        byte[] LoadProductImage(string storageCode);
        string SaveProductImage(byte[] imageData);
        void DeleteProductImage(string storageCode);
        IList<Product> GetProductList(ICriterion criterion, int pageIndex, int pageSize, params Order[] orderBy);
        int CalcProductListCount(ICriterion criterion);
        //CompanyProductLog AddProductToCompany(Guid productGuid, Guid companyGuid);

        //IList<CompanyProductLog> SearchCompanyProduct(string keyword, Guid companyGuid);

        void CreateProductMark(CompanyProductMark productMark);
        void UpdateProductMark(CompanyProductMark productMark);
        void DeleteProductMark(Guid prodcutMarkGuid);

        void CreateProductTradeLog(ProductTradeLog tradeLog);
        void UpdateProductTradeLog(ProductTradeLog tradeLog);

        IList<ProductTradeLog> GetProductTradeLog(ICriterion criterion, int pageIndex, int pageSize,
                                                  params Order[] orderBy);
        int CalcProductTradeLogCount(ICriterion criterion);
    }
}